package com.monkeyboy.spring.customScann;

import com.monkeyboy.spring.annotation.CustomAnno;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.core.type.filter.TypeFilter;
import org.springframework.stereotype.Component;

/**
 * @Author Gavin
 * @date 2021.02.15 12:36
 */
public class CustomerScanner extends ClassPathBeanDefinitionScanner {
	public CustomerScanner(BeanDefinitionRegistry registry) {
		super(registry);
	}

	@Override
	public void addIncludeFilter(TypeFilter includeFilter) {
		super.addIncludeFilter(new AnnotationTypeFilter(CustomAnno.class));
	}
}
